<?php 
	if(empty($this->imgageType)){
		$this->imgageType = Htmlhelper_Img::IMG_COMMENTS;
	}
	$message = null;
	if(!empty($this->message)){
		$message = $this->message;
	}elseif(!empty($_SESSION['message'])){
		$message = $_SESSION['message'];
		$_SESSION['message'] = null;
	}	
	$errors = null;
	if(!empty($this->errors)){
		$errors = $this->errors;
	}elseif(!empty($_SESSION['errors'])){
		$errors = $_SESSION['errors'];
		$_SESSION['errors'] = null;
	}	
?>
<?php if(!empty($message) or !empty($errors)): ?>
	<div class="notice">
		<?php if(!empty($message)) :?>
			<h3 ><?php echo Htmlhelper_Img::showHintImg($this->baseUrl,$this->imgageType) ?>		
			<?php echo $message;?></h3>
		<?php endif; ?>		
		<?php if(!empty($errors)): ?>
			 <ul style="margin-left:2.5em">	 	
			 	<?php foreach ($errors as $error): ?>  
			 	  <?php if(!empty($error)): ?>      
		          <li ><?php echo $error; ?></li>
		          <?php endif; ?>
		        <?php endforeach; ?>
		     </ul>
			<script type="text/javascript">	
				$(document).ready(function() {	 
					<?php foreach ($errors as $key=>$error): ?>
						 $("#fm-form label[@for='<?php echo $key; ?>']").css('color','red');
					<?php endforeach; ?>		
				});	
			</script>
		<?php endif; ?>
	</div>
<?php endif; ?>
<?php echo $this->sqldebug() ;?>
